<?php


require_once dirname(__FILE__)."/../model/user.php";
require_once dirname(__FILE__)."/../model/api.php";


global $_GPC,$_W;
$name=$_GPC['name'];
$userCode=$_GPC['userCode'];
$phone=$_GPC['phone'];
$introducer=$_GPC['introducer'];
$select=$_GPC['select'];
$apply=$_GPC['apply'];
/*
if(!isUser()){
    $url =$this->createMobileUrl('login');
    header("location: $url");
    setJumpUrl();
    die();
}
$user= getUser();
*/

$request = postCurl(getServer()."/doPartyRequest",
    array(
        "requestname"=>$name,
        "cardid"=>$userCode,
        "mobilephone"=>$phone,
        "introducer"=>$introducer,
        "partyid"=>$select,
        "requestinfo"=>$apply
    )
);


if($request['ret']==0){
    echo json_encode(array('status'=>true,'result'=>'申请成功'),true);
}else{
    echo json_encode(array('status'=>false,'result'=>$request['msg']),true);
}

